package com.example.braden.answergame.modules.main.presenter;

import com.example.braden.answergame.base.BaseResult;
import com.example.braden.answergame.modules.main.domain.ReadyEntity;
import com.example.braden.answergame.modules.main.domain.UsePropEntity;

/**
 * Created by braden on 2018/3/2.
 */

public interface MainContact {

    interface IPresenter {
        //登录IM成功，通知后台开始游戏
        void requestStatGame();

        //使用道具
        void requestUseProp(int qid, String prop_id, int is_use);

        void requestReadyGame();

        //上传答案
        void requestUploadChoose(int qid, int answer);

        void requestQuitGame();
    }

    interface IView {
        /**
         * 开始游戏
         */
        void onStartGame(boolean success, BaseResult data, String errMsg);

        /**
         * 准备游戏
         */
        void onReadyGame(boolean success, ReadyEntity data, String errMsg);

        /**
         * 使用道具
         */
        void onUseProp(boolean success, UsePropEntity data, String errMsg);

        /**
         * 答题
         */
        void onAnswerQuestion(boolean success, BaseResult data, String errMsg);

        /**
         * 退出游戏
         */
        void onQuitGame(boolean success, BaseResult data, String errMsg);
    }
}
